<template>
  <div id="app">
    <Son1 />
    <br>
    <br>
    <br>
    <br>
    <Son2 />
  </div>
</template>

<script>
// 引入son1 和 son2 组件
import Son1 from '@/components/son1View.vue'
import Son2 from '@/components/son2View.vue'
import { mapState } from 'vuex'

export default {
  name: 'App',
  created () {
    // 通过this.$store 访问
    // console.log(this.$store.state.count)
    // console.log(this.count, this.title)
  },
  components: {
    Son1,
    Son2
  },
  computed: {
    ...mapState(['count', 'title'])
  }
}
</script>

<style lang="scss" scoped>

</style>
